package klasy.powtorka;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class KalendarzGregorianski {

	public static void main(String[] args) {

		GregorianCalendar now = new GregorianCalendar();
		int month = now.get(Calendar.MONTH);
		int weekday = now.get(Calendar.DAY_OF_WEEK);
		System.out.println(month);	
		System.out.println(weekday);
		
		GregorianCalendar deadline;
		deadline = new GregorianCalendar(2012, 11, 13);
		Date today = deadline.getTime();
		System.out.println(deadline);
		System.out.println(today);
		
		Date birthDate = new GregorianCalendar(1970, 0, 9).getTime();
		System.out.println(birthDate);
		
		GregorianCalendar calendar = new GregorianCalendar();
		System.out.println(calendar);
		calendar.setTime(today);
		int year = calendar.get(Calendar.YEAR);
		System.out.println(year);
	}
	
}
